﻿//#define DEBUG
using EzDesk.DesktopClient.ServiceLocator.ClientTokenService;
using EzDesk.DesktopClient.ServiceLocator.CoreClientLoginService;
using EzDesk.DesktopClient.ServiceLocator.CoreClientService;
using EzDesk.Utility;
using EzDesk.Utility.ServiceReference;

namespace EzDesk.DesktopClient.ServiceLocator
{
    public class ServiceFactory
    {
        public static ICoreClientService CoreClientService
        {
            get
            {
#if DEBUG
                return new StubCoreClientService();

#else
               // return ServiceReferenceFactory<ICoreClientService,CoreClientServiceClient>.GetService();
                return new CoreClientServiceClient();
#endif
            }
        }

        public static IClientTokenService TokenClientService
        {

            get
            {
#if DEBUG
                return new StubClientTokenService();
#else
                //return ServiceReferenceFactory<IClientTokenService,ClientTokenServiceClient>.GetService();
                return new ClientTokenServiceClient();
#endif
            }


        }

        public static ICoreClientLoginService LoginService
        {
            get
            {
#if DEBUG
                return new StubClientLoginService();
#else
                return ServiceReferenceFactory<ICoreClientLoginService,CoreClientLoginServiceClient>.GetService();
                //return new CoreClientLoginServiceClient();
#endif
            }
        }
    }
}
